package com.aim.analysis.artifact;

import java.util.HashMap;
import java.util.Map;

/**
 * User: Avraham Shvartzon
 * Date: 7/24/14
 */
public enum ExperimentDate {

    E_2014_06_16("20140616"),
    E_2014_06_19("20140619"),
    E_2014_07_14("20140714"),
    E_2014_07_24("20140724"),
    E_2014_07_31("20140731"),
    E_2014_08_21("20140821"),
    E_2014_09_02("20140902"),
    E_2015_01_15("20150115"),
    E_TEST("Test");

    public final String tableSuffix;

    private static Map<String, ExperimentDate> map = new HashMap<String, ExperimentDate>();
    static{
        for (ExperimentDate experimentDate : values()){
            map.put(experimentDate.tableSuffix, experimentDate);
        }
    }

    public static ExperimentDate byTableSuffix(String tableSuffix){
        ExperimentDate experimentDate = map.get(tableSuffix);
        assert experimentDate != null;
        return experimentDate;
    }

    private ExperimentDate(String tableSuffix) {
        this.tableSuffix = tableSuffix;
    }
}
